Iterator for array template container. More...
#include <tarray.h>
Public Member Functions | |
TArrayIterator (const TArrayBase< T > &arr) | |
Iterator constructor. | |
virtual bool | done () const |
virtual T & | next () |
virtual T & | previous () |
virtual T & | current () const |
virtual void | first () |
virtual void | last () |
const TArrayBase< T > & | array () const |
Return array reference. |
Iterator for array template container.
TArrayIterator | ( | const TArrayBase< T > & | arr | ) | [inline] |
Iterator constructor.
bool done | ( | ) | const [inline, virtual] |
Check if end of container is reached.
"done" returns whether or not this iterator can advance any further.
Implements TIterator< T >.
T & next | ( | ) | [inline, virtual] |
Returns the current data and advances the iterator. postfix as in t = c++;.
"next" returns the current item in the array and advances the iterator to the next item.
Implements TIterator< T >.
T & previous | ( | ) | [inline, virtual] |
Returns the current data and backup. postfix as in t = c--;.
"previous" returns the current item in the array and decrements the iterator to the previous item.
Implements TIterator< T >.
T & current | ( | ) | const [inline, virtual] |
void first | ( | ) | [inline, virtual] |
void last | ( | ) | [inline, virtual] |
const TArrayBase< T > & array | ( | ) | const [inline] |
Return array reference.
"array" returns a reference to the array being iterated.